package cn.edu.scau.cmi.ZengLinghong.chapter06;

abstract class AA{
	abstract int sum(int x, int y);
	int sub(int x, int y) {
		return x-y;
	}
}

class BB extends AA{
	int sum(int x, int y) {
		return x+y;
	}
}

public class Example6_9 {

	public static void main(String[] args) {
		BB b = new BB();
		int sum = b.sum(20, 30);
		int sub = b.sub(30, 20);
		System.out.println("sum="+sum);
		System.out.println("sub="+sub);
	}

}
